<%--
 *  File:   ZYLTest.jsp
 *  Author: HuaziDang 
 *  Date:   2011/01/13
 *
 *  Copyright (C) 2000 - 2011 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.        
--%>

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>
<%@ page import="com.oval.emanager.service.*" %>
<%@ page import="com.oval.foundation.DefaultParams"%>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%
 	Category cat = Category.getInstance("jsp.UploadEXL");  
	String privilegeCode = "Z061";
    String strModuleName = "IMG";
    String contextPath = request.getContextPath();   
    ExcelEngine.loadStaticFormatCache(DefaultParams.findParam("exceldesc-path")); 
%>

<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<html>
<head>
<title>UploadEXL</title>
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript">
function page_operate(operand)
{
   if (isEmpty(cform.uploadfile.value)) {
       alert('test');
         return;
       }
   var realfilepath = eval("cform.uploadfile");
   var filename = ""
   var filetype = ""
   var pname = realfilepath.value;
   pname = pname.substring(pname.lastIndexOf("\\") + 1, pname.length);
   cform.filename.value = pname;
   cform.filetype.value = pname.substring(pname.lastIndexOf(".") + 1);
    
    
	  cform.encoding="multipart/form-data";
	  cform.actionname.value = "upload";
	  cform.target = "_self";
	  cform.submit();
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%@ include file="/inc/PageLocation.inc" %>
<form name="cform" method="post" action="<%=contextPath %>/Dispatcher" >
<input type="hidden" name="pagename" value="p_zyltest">
<input type="hidden" name="actionname">   
<input type="hidden" name="filename">
<input type="hidden" name="filetype">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
 <tr>
  <td> 
  	<%= label.getLabelName("L_Path") %><%= label.getLabelName("L_Colon") %><input type="file" name="uploadfile" size="50">
    <br><a onclick="page_operate('upload')"><custom:button type="1" label="L_Finish" imgsrc="finish.gif" border="0" style="width:60"/></a>
  </td>
 </tr>
</table>
</form>
</body>
</html>


